package edu.sctu.zhangwang.month201505.textOne;

/**
 * Created by user10 on 2015/5/13.
 */
public class Employee {
    protected String name;
    protected int number;
    protected String address;
    protected float salary;

    public Employee(String name,int number){
        this.name = name;
        this.number = number;
    }
    public Employee(String name,int number,String address){
        this(name,number);
        this.address = address;
    }
    public Employee(String name,int number,String address,float salary){
        this(name,number,address);
        this.salary = salary;
    }

    public void setAddress(String address){
        this.address = address;
    }
    public void setSalary(float salary){
        this.salary = salary;
    }

    public String empInfo(){
        return "\t姓名:"+name+"\t工号:"+number+"\t住址:"+address+"\t薪水:"+salary;
    }
    public void raiseSalary(float proportion){
        salary += salary*proportion;
    }
}
